package com.coderman.basketball.domain.gataway.trade;

import com.coderman.basketball.domain.model.trade.bo.TradePlayerApplyBO;
import com.coderman.basketball.domain.model.trade.bo.TradeBO;
import com.coderman.basketball.domain.model.trade.bo.TradeTeamApplyBO;


/**
 * Description:
 * date: 2021/4/19
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
public interface TradeRepository {
    /**
     * 创建一场交易
     * @param tradeTeamApplyBO
     * @return
     */
    String startOneTradeApply(TradeTeamApplyBO tradeTeamApplyBO);

    /**
     * 交易失败处理
     * @param tradeCode
     * @return
     */
    String tradeFail(String tradeCode);

    /**
     * 交易成功处理
     * @param tradeCode
     * @return
     */
    String tradeSuccess(String tradeCode);

    /**
     * 球员申请交易
     * @param tradeApplyBO
     * @return
     */
    String applyTrade(TradePlayerApplyBO tradeApplyBO);

    /**
     * 获取一场交易详情
     * @param tradeCode
     * @return
     */
    TradeTeamApplyBO getOneTrade(String tradeCode);

    /**
     * 同步交易状态
     * @param tradeCode
     * @param status
     * @return
     */
    TradeTeamApplyBO syncTradeApplyStatus(String tradeCode,Integer status);


}
